﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
namespace SurvivalCav
{
    public class Tile
    {
        private Rectangle retangulo;
        private int tipo;
        private bool andavel;

        public Rectangle Retangulo
        {
            get { return this.retangulo; }
            set { this.retangulo = value; }
        }

        public int Tipo
        {
            get { return this.tipo; }
            set { this.tipo = value; }

        }
        public bool Andavel
        {
            get { return this.andavel; }
            set { this.andavel = value; }
        }

        public Tile(int tipo, bool andavel, int x,int y,int larguraTile, int alturaTile)
        {
            this.Tipo = tipo;
            this.Andavel = andavel;
            this.retangulo = new Rectangle(x, y, larguraTile, alturaTile);


        }

        public bool Collide(Rectangle box)
        {
            return this.retangulo.Intersects(box);
        }
    }
}
